
#ifndef STREAM_VIDEO_WIDGET_H
#define STREAM_VIDEO_WIDGET_H

#include <QtCore>
#include <QtGui>
#include "def.h"

class StreamVideoWidget : public QGroupBox
{
	Q_OBJECT

public:
	StreamVideoWidget(void);
	~StreamVideoWidget(void);

	inline bool isPaused() { return m_chkPaused->isChecked(); }
	inline bool isPlayback() { return m_chkPlayback->isChecked() && m_chkPlayback->isEnabled(); }
	inline const int currentSource() { return m_cmbSources->currentIndex(); }
	void enablePlayback(const bool bEnabled);

public slots:
	void onSetPaused(int state);
	void onSetPlayback(int state);
	void onChangeSource(int idx);

signals:
	void onSourceChanged(const int srcIdx);
	void onPause(const bool bPaused);
	void onPlayback(const bool bPlayback);

private:
	QLabel *m_lblSource;
	QComboBox *m_cmbSources;
	QCheckBox *m_chkPaused;
	QCheckBox *m_chkPlayback;

	void createInterface();
	void loadSourceList();

};

#endif // STREAM_VIDEO_WIDGET_H
